import { getDB } from '../../db';

/**
 * 添加实时监控标注
 */
export const createRealTimeMonitoring = () => {
  const db = getDB();
  return db.prepare<[LX.DBService.MarkRealTimeInfoInfo]>(`
      INSERT INTO "main"."video_real_mark_info" ("id","start_time","end_time","label","describe","channel","status","create_time","create_user") 
      values(@id,@startTime,@endTime,@label,@describe,@channel,@status,@createTime,@createUser)`);
};

/*获取最大id*/
export const getMaxId = () => {
  const db = getDB();
  return db.prepare<[], LX.DBService.MarkInfoMaxId>(
    `SELECT max(cast(id as int)) id FROM "main"."video_real_mark_info" `,
  );
};
